import { ProFormRadio, ProFormSelect, ProFormText } from '@ant-design/pro-form';
import { getRegistryOptions } from '@/pages/Registry/api';

export default () => {
  return (
    <>
      <ProFormSelect
        name="ide_registry_id"
        label="镜像源"
        rules={[{ required: true, message: '请选择镜像源' }]}
        request={getRegistryOptions}
      />
      <ProFormText name="name" label="名称" rules={[{ required: true, message: '名称' }]} />
      <ProFormText
        name="version"
        label="版本"
        rules={[{ required: true, message: '请填写版本' }]}
      />
      <ProFormRadio.Group
        name="ide_type"
        label="类型"
        options={[
          {
            label: 'jupyter',
            value: 0,
          },
          {
            label: 'vscode',
            value: 1,
          },
          {
            label: 'IntelliJ IDEA',
            value: 2,
          },
          {
            label: 'CLion',
            value: 3,
          },
          {
            label: 'Goland',
            value: 4,
          },
          {
            label: 'PyCharm',
            value: 5,
          },
          {
            label: 'WebStorm',
            value: 6,
          },
        ]}
      />
      <ProFormText name="git_url" label="Git地址" />
      <ProFormText name="note" label="描述" />
    </>
  );
};
